//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: wubipref.c 757 2007-05-10 08:19:31Z roger $
//


#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gnome.h>
#include <glade/glade.h>
#include <gconf/gconf-client.h>

#include "prefedit.h"
#include "wubipref_cb.h"
#include "wubipref.h"
void
wubipref_main (void)
{
	GtkWidget *w;
	gboolean boolean;
	GConfClient *client = gconf_client_get_default();

	xml_wubipref = glade_xml_new(UNIHAN_DATA_DIR "/xml/wubipref.glade",
			"windowwubi", NULL);
	
	w = glade_xml_get_widget(xml_wubipref, "wubi/freq");
	boolean = gconf_client_get_bool(client,
				UNIHAN_ROOT_KEY "/im-options/wubi/freq",
				NULL);
	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), boolean);
    g_signal_connect(G_OBJECT(w), "toggled",
        	G_CALLBACK(on_wubi_freq_adjust_toggled),
			xml_wubipref);
	
	w = glade_xml_get_widget(xml_wubipref, "button1");
	g_signal_connect(GTK_OBJECT(w),
			"clicked",
			G_CALLBACK(on_wubi_help_clicked),
			xml_wubipref);
			
	w = glade_xml_get_widget(xml_wubipref, "button2");
	g_signal_connect(GTK_OBJECT(w),
			"clicked",
			G_CALLBACK(on_wubi_close_clicked),
			xml_wubipref);


}


// vi:ts=4:nowrap:cin:expandtab
